FROM alpine:latest AS production
RUN apk --no-cache add ca-certificates

WORKDIR /build

COPY ./cmd/docker/user/main ./
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

ENV MICRO_ADRESS=":50051"
ENV MICRO_REGISTRY="mdns"
ENV TZ="Asia/Shanghai"

EXPOSE 50051

ENTRYPOINT ["./main"]